package indi.jp.project.core.config;

import indi.jp.project.core.filter.RequestFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WebConfig {

    @Bean
    public FilterRegistrationBean<RequestFilter> requestFilter(){
        FilterRegistrationBean<RequestFilter> frb = new FilterRegistrationBean<RequestFilter>();
        frb.setFilter(new RequestFilter());
        frb.addUrlPatterns("/*");
        frb.setOrder(1);
        return frb;
    }

}
